package com.sqx.modules.errand.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sqx.modules.errand.entity.SysComplaint;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface ComplaintDao extends BaseMapper<SysComplaint> {

    List<SysComplaint> selectComplaintList(Long userId);

    SysComplaint findComplaint(Long complaintId);

    BigDecimal deductMoneySum(String date, String dateType);

    IPage<SysComplaint> findAppComplaint(Page<SysComplaint> pages, Long userId, Integer illegalId, Integer complaintState);



    IPage<SysComplaint> getUserComplaint( Page<SysComplaint> pages,Long userId);

    IPage<SysComplaint> findAllComplaint(@Param("pages") Page<SysComplaint> pages, @Param("complaint") SysComplaint complaint);
}
